// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import Initial_Page from '../Views/Initial_Page.vue'
import Login_Register_Page from '../Views/Login_Register_Page.vue'
import Home_Page from "../Views/Home_Page.vue";
import test from '../Views/test.vue'
import Intelligent_travel_plan from '../Views/Intelligent_travel_plan.vue'
import Home_Prediction_Function from  '../Views/Home_Prediction_Function.vue'
import Introduction_Details from '../Views/Introduction_Details.vue'
import Wallet_recharge from '../Views/Drop_down_view/Wallet_recharge.vue'
import Personal_homepage from '../Views/Drop_down_view/Personal_homepage.vue'
// 修改路由配置，将根路由指向一个新的组件而不是App.vue
const routes = [
    {
        path: '/',
       component:Initial_Page
    },
    {
        path: '/Login_Register_Page',
        component: Login_Register_Page
    },
    {
        path: '/Home_Page',
        component: Home_Page,
        children:[
            {
                path:'Intelligent_travel_plan',
                component:Intelligent_travel_plan
            },
            {
                path: 'Home_Prediction_Function',
                component: Home_Prediction_Function
            },
            {
                path:'Introduction_Details',
                component: Introduction_Details
            },
            {
                path:'Wallet_recharge',
                component: Wallet_recharge
            },
            {
                path:'Personal_homepage',
                component: Personal_homepage
            }
        ]
    },
    {
        path: '/test',
        component: test
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router